package com.twu.biblioteca.MenuItems;

import com.twu.biblioteca.UserAccount;

public class LogoutMenuItem  extends MenuItem{

    public LogoutMenuItem() {
        description = "Logout";
    }

    public boolean controller (UserAccount sessionUser) {

        if(sessionUser.isActive()) {
            sessionUser.deactivate();
            return true;
        }
        return false;

    }
}
